import { post } from '../ajax'
import { getAjaxBaseUrl } from '../handler'
import type { AjaxPagingResult } from '@/types'

const controller = getAjaxBaseUrl(
  '/earlyWarning',
  '/energy',
)

/** 查询实时预警信息列表（分页） */
export function selectEarlyWarningList(pageNum: number = 1, pageSize: number = 15, earlyWarningType?: string) {
  return post<AjaxPagingResult>(`${controller}/selectEarlyWarningList`, {
    pageNumber: pageNum,
    pageSize,
    earlyWarningType,
  })
}
